package com.zxmr.webclient.action.dto;

public class CompanyRegister extends DTOBase{

	String company_name;
	String province;
	String city;
	String distinguish;
	String detailAddress;
	String company_phone;
	
	String admin_name;
	String admin_display;
	String admin_password;
	String admin_phone;
	String admin_email;
	
	public String getCompany_name() {
		return company_name;
	}
	public void setCompany_name(String company_name) {
		this.company_name = company_name;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getDistinguish() {
		return distinguish;
	}
	public void setDistinguish(String distinguish) {
		this.distinguish = distinguish;
	}
	public String getDetailAddress() {
		return detailAddress;
	}
	public void setDetailAddress(String detailAddress) {
		this.detailAddress = detailAddress;
	}
	public String getAdmin_name() {
		return admin_name;
	}
	public void setAdmin_name(String admin_name) {
		this.admin_name = admin_name;
	}
	public String getAdmin_password() {
		return admin_password;
	}
	public void setAdmin_password(String admin_password) {
		this.admin_password = admin_password;
	}
	public String getAdmin_phone() {
		return admin_phone;
	}
	public void setAdmin_phone(String admin_phone) {
		this.admin_phone = admin_phone;
	}
	public String getAdmin_email() {
		return admin_email;
	}
	public void setAdmin_email(String admin_email) {
		this.admin_email = admin_email;
	}
	
	public String getCompany_phone() {
		return company_phone;
	}
	public void setCompany_phone(String company_phone) {
		this.company_phone = company_phone;
	}
	
	public String getAdmin_display() {
		return admin_display;
	}
	public void setAdmin_display(String admin_display) {
		this.admin_display = admin_display;
	}
	/**
	 * if success then return "success" else return error message
	 * @return
	 */
	public String validate()
	{
		if(this.isEmptyWithTrim(company_name))return "��λ��Ʋ���Ϊ��";
		if(this.isEmptyWithTrim(province)||this.isEmptyWithTrim(city)
				||this.isEmptyWithTrim(distinguish) 
				|| this.isEmptyWithTrim(detailAddress))
			return "��ַ��Ϣ��ȫ";
		if(this.isEmptyWithTrim(company_phone))return "��λ��ϵ�绰����Ϊ��";
		if(this.isEmptyWithTrim(admin_email)||this.isEmptyWithTrim(admin_name)
				||this.isEmptyWithTrim(admin_password)||this.isEmptyWithTrim(admin_phone))
			return "����Ա��Ϣ��ȫ";
		return "success";
			
	}
}
